const express = require("express")
const router = express.Router()

const userHandle = require("../router_handle/user.js")
// 1. 导入验证表单数据的中间件
const expressJoi = require('@escook/express-joi')
// 2. 导入需要的验证规则对象
const { reg_login_schema,login_schema } = require('../schema/user')

router.post("/register",expressJoi(reg_login_schema),userHandle.register)
router.post("/login",expressJoi(login_schema),userHandle.login)
router.post("/shoplogin",userHandle.shoplogin)
router.post("/shopUserDetail",userHandle.shopUserDetail)
router.get("/getUserInfo",userHandle.getUserInfo)
module.exports = router